package com.backend.werewolfkillingbackend.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("player")
public class Player implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField(value = "room_id")
    private Long roomId;

    @TableField(value = "role_id")
    private Long roleId;

    @TableField(value = "u_id")
    private Long uId;

    @TableField(value = "name")
    private String name;

    @TableField(exist = false)
    private Role role;

    @TableField(value = "alive")
    private Integer alive = 1;

    @TableField(value = "vote_num")
    private Integer vote_num = 0;

    @TableField(value = "werewolf_token")
    private Integer werewolf_token = 0;

    @TableField(value = "guard_token")
    private Integer guard_token = 0;

    @TableField(value = "seer_token")
    private Integer seer_token = 0;

    @TableField(value = "seat")
    private Integer seat;

    private Integer isRoomOwner;

    @TableField(value = "avatar")
    private String avatar;

    public Player(String name) {
        this.name = name;
    }

    public Player() {

    }

}

